package com.atguigu.controller;

import com.atguigu.Dto.UserDto;
import com.atguigu.pojo.User;
import com.atguigu.result.Result;
import com.atguigu.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public Result test(@RequestBody UserDto userDto){
        Result result= userService.getUser(userDto);
        return result;
    }
    @RequestMapping
    public String test(){
        return "success";
    }
}
